<template>
  <div class="big_box">
      <div><h2>vue-element ui 简易后台管理系统</h2></div>
    <div class="box">
      <div class="title">登录</div>
      <el-form :model="ruleForm" status-icon ref="ruleForm" label-width="50px">
        <el-form-item label="账号">
          <el-input v-model="ruleForm.name" autocomplete="off"></el-input>
        </el-form-item>
        <el-form-item label="密码">
          <el-input
            type="password"
            v-model="ruleForm.pass"
            autocomplete="off"
            show-password
          ></el-input>
        </el-form-item>
        <div>
          <el-button type="primary" @click="submitForm('ruleForm')"
            >登录</el-button
          >
        </div>
      </el-form>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      ruleForm: {
        name: "admin",
        pass: "admin",
      },
    };
  },
  methods: {
    submitForm() {
      this.$router.push("/index/page1");
    },
  },
};
</script>
<style scoped>
.big_box{
    text-align: center;
}
h2{
    margin-top: 20px;
}
.box {
  width: 360px;
  margin: 0 auto;
  padding: 10px;
  margin-top: 15%;
  background: white;
  border-radius: 3px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04);
}
.title {
  text-align: center;
  margin-bottom: 30px;
  font-size: 18px;
  font-weight: 600;
}
</style>